﻿using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;

namespace Sharp.Portal.Mvc.Bootstrap
{
    public sealed class LableBuilder : TagElementBuilder<LableBuilder>
    {        
        public LableBuilder()
        {
            AddClass("control-label");
        }

        public LableBuilder Text(string text)
        {
            TagBuilder.InnerHtml = text;
            return this;
        }

        public override string TagName => "lable";

        public override string ToHtmlString()
        {
            //var builder = new StringBuilder();

            //builder.AppendLine(TagBuilder.ToString(TagRenderMode.StartTag));

            //builder.AppendLine(TagBuilder.ToString(TagRenderMode.EndTag));

            //return new HtmlString(builder.ToString()).ToHtmlString();
            return new HtmlString(TagBuilder.ToString()).ToHtmlString();
        }

    }
}
